package com.detail.controller;

import com.detail.entity.Order;
import com.detail.facade.OrderFacadeService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: Duansanmao
 * @Date: 2021/7/18 17:46
 */
@RestController
@AllArgsConstructor
@RequestMapping("order")
public class OrderController {


    @Resource
    private final OrderFacadeService orderFacadeService;


    @GetMapping
    public Order orderDetail(@RequestParam("orderId") String orderId) {

        return  orderFacadeService.getOrderDetail(orderId);

    }
}
